iconhelper: Recreate the texture when needed
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Jan 2021 21:37:55 +0000 (16:37 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 11 Jan 2021 22:50:05 +0000 (17:50 -0500)
When the icon size changes, we want to reload themed
icons.

This was showing up as the GtkImage in about dialogs
getting a big size with the same small icon upon
changing -gtk-icon-size in the inspector.

gtk/gtkiconhelper.c

index 39ccaf044b2ebd3a8563218ea48e7d3c13d9d013..54b06396f6d66ef98f13d1775c9ab2d6bee62be1 100644 (file)
@@ -348,7 +348,8 @@ gtk_icon_helper_invalidate_for_change (GtkIconHelper     *self,
                                        GtkCssStyleChange *change)
 {
   if (change == NULL ||
-      gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_ICON_TEXTURE))
+      gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_ICON_TEXTURE |
+                                            GTK_CSS_AFFECTS_ICON_SIZE))
     {
       /* Avoid the queue_resize in gtk_icon_helper_invalidate */
       g_clear_object (&self->paintable);